#include<stdio.h>
double  fact(int  a)
{
	if (a == 1)
		return 1;
	else
		return a * fact(a - 1);
	
}
int main()
{
	int a = 0;
	double ret;
	scanf("%d", a);
	ret = fact(a);
	printf("%d", ret);
	return 0;
}
